package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.DigitalCollectionProductInfoAuctionUserBidding;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sc.nft.entity.vo.AuctionConsumeAdminPageVO;
import com.sc.nft.entity.vo.AuctionConsumeUserDetailAdminPageVO;
import com.sc.nft.entity.vo.DigitalCollectionProductInfoAuctionUserBiddingResultsVO;
import com.sc.nft.entity.vo.UserAuctionRecordPageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户拍卖出价表 Mapper 接口
 * </p>
 *
 * @author liGen
 * @since 2024-09-05
 */
@Mapper
public interface DigitalCollectionProductInfoAuctionUserBiddingMapper extends BaseMapper<DigitalCollectionProductInfoAuctionUserBidding> {

    /**
     * 用户拍卖记录
     *
     * @param userId
     * @param mp
     * @return
     */
    IPage<UserAuctionRecordPageVO> auctionRecords(Page mp ,@Param("userId") Long userId);

    /**
     * 获取拍卖投注的数量结果
     *
     * @param productId      拍卖商品ID
     * @return
     */
    List<DigitalCollectionProductInfoAuctionUserBiddingResultsVO> getResultsVOList(@Param("productId") Long productId);

    /**
     * 消耗藏品总数列表
     * @param productId
     * @param page
     * @return
     */
    Page<AuctionConsumeAdminPageVO> auctionConsumeAdminPage(@Param("productId") Long productId, Page page);


    /**
     * 用户消耗总数详情列表
     * @param productId
     * @param page
     * @return
     */
    Page<AuctionConsumeUserDetailAdminPageVO> auctionConsumeUserDetailAdminPage(@Param("productId") Long productId,@Param("userId") Long userId, Page page);



}
